import 'normalize.css';
import '@/styles/global.less';
import { createApp } from 'vue';

import App from './App.vue';
import router from './router';
import { MotionPlugin } from '@vueuse/motion';
import 'viewerjs/dist/viewer.css';
import VueViewer from 'v-viewer';
import pinia from '@/stores';
const app = createApp(App);

// 使用 Pinia 进行状态管理
app.use(pinia);
// 使用 Vue Router
app.use(router);
// 使用Motion动画库
app.use(MotionPlugin);
// 使用图片预览组件
app.use(VueViewer, {
  defaultOptions: {
    navbar: false,
    title: false,
    toolbar: {
      zoomIn: 4,
      zoomOut: 4,
      oneToOne: 4,
      reset: 4,
      prev: false,
      play: false,
      next: false,
      rotateLeft: 4,
      rotateRight: 4,
      flipHorizontal: false,
      flipVertical: false,
    },
    backdrop: true,
    loading: true,
    loop: false,
    keyboard: true,
    transition: true,
    zoomRatio: 0.2,
  }
});
app.mount('#app');
